Methods
(static) hasValue(Any) → {function}
- Source:
- Since:
- v0.9.0
Return a function that returns true if at least one of the input object properties has the provided value.
Example
> hasTwo = hasValue(2)
> hasTwo({a: 1, b: 2})
true
> hasTwo({a: 1, b: 3})
false
> hasEmptyList = hasValue([])
> hasEmptyList({a: 1, b: []})
true
> hasEmptyList({a: 1, b: 3})
false
Parameters:
Name | Type | Description |
---|---|---|
Any |
* |
Returns:
predicate - (Object -> Boolean)
- Type
- function